I. Field of the Invention
The present invention relates generally to the field of computers and specifically to a dynamic cache used in computers.
II. Description of the Prior Art
Data caches are known in the art and used in a wide variety of computers to enhance operation. The present invention describes a cache useful in enhancing I/O operation, primarily with direct access storage devices (DASD) commonly known as disks.
Such a cache uses a portion of main storage or memory to act as a buffer containing often used portions of a data file residing on a disk. Since access to main storage, (generally solid state RAM) tends to be considerably faster than access to disk (a mechanical device) execution of various file I/O can be greatly enhanced by bringing data likely to be needed by the processor into memory before it actually needed by the processor.
A data cache can do this by inserting a set of buffers between the operating system and the disk. The data cache program maintains this set of buffers and manages the buffers so that if the data is in the buffer when a request is made to the disk the request is satisfied from one of the buffers and not from the disk. This results in significantly faster disk accesses.
The buffers are maintained such that when a request is made to the disk and the data is not in one of the buffers, the data is read into one (or more) of the buffers before the request returns to the operating system. This allows the cache to get new data that is being accessed. The cache must also maintain the buffers so that "older" less often referenced data can be replaced with "newer" potentially more often referenced data. The cache does this by maintaining a list or directory of all the buffers. The list is maintained so that the more often used buffers are near one end of the list and the less often used buffers are near the other end. If the cache needs a buffer (for new data) it gets one from the end of the list that has the less often used buffers. This is called an LRU (Least Recently Used) list, and while other methods for bringing data into the cache may be used LRU algorithms are the most widely used.
In the prior art, data caches that exploit processor memory have been static in size and do not adapt to competing demands for the storage resource. Also, they only exploit main, or at best virtual memory.
Accordingly, it is an object of the invention to provide a data cache that is not static in size.
It is a further object of the invention to provide a data cache that dynamically adapts its size in response to competing demands for processor storage so as to optimize system throughput.
It is still another object of the invention to provide a data cache that exploits either or both of real or expanded storage cooperatively with other operation system components.
These, and other, objects, advantages, and features of the invention will be more apparent upon reference to the description and the appended drawings.